home *** CD-ROM | disk | FTP | other *** search
- /* cgets.c --- p 510 */
- #include <conio.h>
- main()
- {
- int numread;
- char string[82], *input;
- string[0] = 80; /* Max no. of characters */
- cprintf("Enter a line: ");
- input = cgets(string);
- numread = string[1]; /* Number of chars read*/
- cprintf("\nYou entered: %d characters. The string is \r\n%s\r\n",
- numread, input);
- }